package rensoft.portfolio.client.model;

import cs.java.lang.Service;

import rensoft.gwt.client.lang.GwtBase;
import rensoft.gwt.client.lang.ServiceImpl;
import rensoft.portfolio.client.model.titles.Titles;
import rensoft.portfolio.client.model.titles.TitlesImpl;

public class ApplicationImpl extends GwtBase implements Application {

  private final PageHistory pagehistory;
  private final Service service = new ServiceImpl();

  public ApplicationImpl() {
    pagehistory = new PageHistory(this);
    getService().serve(Titles.class, new TitlesImpl(this));
    getService().serve(Application.class, this);
    pagehistory.initialize();
  }

  @Override
  public Service getService() {
    return service;
  }

}
